(1) Field of the Invention
The present invention relates to an intra prediction apparatus in video coding and an intra prediction method, and particularly to a technique for improving the efficiency in the intra prediction coding in H.264 or the like.
(2) Description of the Related Art
Recent years have seen the widespread use of broadband communication infrastructures or the like and the reduction in prices of storage devices with a large capacity such as personal computers, HDDs and DVDs, and additionally memory cards. This has created an environment where general consumers edit, store, distribute and carry video, and the number of such users is further increasing.
Today, general consumers handle video in a great number of scenes. However, there remain cases where a sufficient performance is not provided in handling video although the performance of a personal computer has been improved in these days. For example, since the information amount of video is very large, it still takes a lot of time to compress moving pictures even with a high-performance personal computer. A conceivable solution to this problem is to improve the operation efficiency, in other words, to reduce the number of operations maintaining the coding performance. In addition, performing highly efficient operations leads to reducing electric power consumption and easing time constraints in video recording which depends on a battery status of a portable video recorder. In these circumstances, the need for a highly efficient moving picture compression technique has been further increasing.
Such being the case, the H.264 Standard which is an international standard for moving picture compression was newly born. An object of H.264 is to improve picture quality and coding efficiency. For this purpose, plural moving picture compression tools are used in H.264. In addition, H.264 has features of comparing plural prediction methods in sequence, selecting one prediction methods with an excellent coding efficiency from among the prediction methods, and performing coding according to the selected methods.
In an example case of performing coding in a 16×16 pixel macroblock included in an I picture shown in FIG. 1, the following intra prediction coding is performed in parallel: an intra prediction coding of each 4×4 pixel block which is one of the 16 segments obtained by dividing the 16×16 macroblock in one of the plural directions; and an intra prediction coding of the macroblock in plural directions.
In a representative 4×4 intra prediction, the most efficient prediction method is selected by comparing plural prediction methods.
As shown in FIG. 2, there are nine prediction modes including eight directional prediction modes and one undirectional prediction mode. The eight directional prediction modes are: (a) a prediction mode 0 (vertical) for calculating prediction pixel values based on the macroblock positioned above the current macroblock and predicting pixel values in the vertical direction; (b) a prediction mode 1 (horizontal) for calculating prediction pixel values based on the neighbouring macroblock and predicting pixel values in the horizontal direction; (c) a prediction mode 8 (horizontal-up) for calculating prediction pixel values from the neighbouring macroblock and predicting pixel values in the direction inclined by +22.5 degrees from the horizontal direction; (d) a prediction mode 6 (horizontal-down) in the direction inclined by −22.5 degrees from the horizontal direction; (e) a prediction mode 4 (diagonal-down-right) in the direction inclined by −44.5 degrees from the horizontal direction; (f) a prediction mode 5 (vertical-right) for calculating prediction pixel values obtained based on the neighbouring macroblock and predicting pixel values in the direction inclined by +22.5 degrees from the vertical direction; (g) a prediction mode 7 (vertical-left); and a prediction mode 3 (diagonal-down-left) in the direction inclined by −22.5 degrees from the vertical direction; and (h) a prediction mode 3 (diagonal-down-left) in the direction inclined by −44.5 degrees from the vertical direction. Additionally, the undirectional prediction mode is a prediction mode 2 (DC) for predicting pixel values based on the mean values of pixel vales of the neighbouring macroblocks.
Likewise, there are plural prediction methods in a 16×16 intra prediction. There are four prediction methods of a kind in this 16×16 intra prediction.
As shown in FIG. 3, 16×16 intra prediction methods are: a prediction mode 0 (vertical); a prediction mode 1 (horizontal); a prediction mode 2 (DC); and a prediction mode 3 (Plane).
For this reason, as shown in FIG. 4, a conventional intra prediction apparatus calculates a prediction error (Sum of Absolute Difference: SAD) of Block 0 according to each of the nine prediction modes in response to the input of an I picture. In other words, a conventional intra prediction apparatus calculates all of the difference values between the reference pixels and the pixels to be coded and the SADs according to the nine prediction modes. After that, the intra prediction apparatus employs the optimum prediction mode which can provide the smallest prediction error as the optimum intra prediction method. Note that the SADs may be calculated after an orthogonal transform is performed on the difference values, in other words, after the difference values are transformed into frequency components.
After the intra prediction of Block 0 is completed, the intra prediction apparatus repeats the same processing, and performs intra predictions of Blocks 1 to 15.
After the intra prediction of Block 15 is completed, the conventional intra prediction apparatus calculates all of the difference values between the reference pixels and the pixels to be coded in the macroblock and the SADs according to the four prediction modes. After that, the intra prediction apparatus uses the smallest prediction error such as one of the following in order to perform the intra prediction: the total of the SADs of the respective blocks; and the SAD of the macroblock. In other words, in the case where the total of the SADs of the respective blocks is the smallest, the intra prediction apparatus outputs the total of the SADs of the respective blocks. In the other case where the SAD of the macroblock is the smallest, the intra prediction apparatus outputs the difference values of the macroblock. In this way, the data of an I picture is compressed.
However, as described above, it takes a lot of time for a conventional intra prediction apparatus to complete the intra prediction of the 4×4 pixel blocks and the intra prediction of the 16×16 pixel block using the intra prediction of the H.264 Standard which is a laid-open international video compression scheme. This is because prediction images are created according to plural prediction methods (nine intra prediction modes for 4×4 pixel blocks, and four intra prediction modes for 16×16 pixel blocks) in order to improve picture quality, and the process of selecting the optimum prediction mode from among the various prediction modes is performed in sequence, in other words, the process of selecting the mode with a high coding efficiency based on the calculation results is performed in sequence.
In other words, in the intra prediction for 4×4 pixel blocks among the intra prediction schemes of the H.264 Standard, the following processes of calculating pixel values of a picture to be reproduced are performed in the order shown in FIG. 1: (a) calculating the differences between the coded pixel values and the pixel values to be coded in the 4×4 blocks according to the respective prediction modes intended for calculating the differences in different directions; (b) determining the prediction mode to be employed which can provide the smallest SAD from among the prediction modes; (c) calculating quantization coefficients by performing an orthogonal transform or a quantization of the difference values between the coded pixel values and the pixel values to be coded according to the determined prediction mode; and (d) performing an inverse intra prediction which means reproducing the difference values by performing an inverse quantization or an inverse orthogonal transform of the quantization coefficients, and then to add the reproduced difference values and the prediction pixel values. For example, since the decoded pixels of Block 2 are used in the Standard in order to perform an intra prediction of Block 3, the prediction processes must be performed in sequence as shown in FIG. 5. This means that each of the processes which are an intra prediction, an orthogonal transform, a quantization and the like cannot be performed efficiently, resulting in causing the problem that it takes a lot of time to complete the prediction processes.
Therefore, for the purpose of realizing a video compression technique which can provide high-quality pictures efficiently, there are needs today for reducing the time to perform intra prediction in H.264 because H.264 can provide high-quality pictures.
In order to solve this problem, a conventional intra prediction apparatus performs intra predictions in the order different from the order defined in the Standard, that is, the ascending order of block numbers shown in FIG. 6. This makes it possible for the conventional intra prediction apparatus to start the processing of Block 3 before starting the processing of Block 4 as shown in FIG. 7, and thus to perform the processes of an intra prediction, orthogonal a transform, and a quantization (refer to Patent Reference 1). As the result, it becomes possible to realize a pipeline operation of the processes.    Patent Reference 1: Japanese Patent Publication No. 2004-140473 (pp. 1 to 21).    Non-patent Reference 1: H.264 Advanced video coding for generic audiovisual services    (ftp://ftp.imtc-files.org/jvt-experts/2003—09_SanDiego/JVT-I050.doc)    Non-patent Reference 2: H.264/AVC TEXTBOOK, impress standard textbook series, ISBN No. 4844319833, (July 2004).